﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControls_ctlMessage : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

        attention.Visible = false;
        info.Visible = false;
        error.Visible = false;
        success.Visible = false;

    }

    public void showMessage(string type, string message)
    {
        if (type == "warning")
        {
            Label1.Text = message;
            attention.Visible = true;
        }
        else
        {
            if (type == "info")
            {
                Label2.Text = message;
                info.Visible = true;
            }
            else
            {
                if (type == "success")
                {
                    Label3.Text = message;
                    success.Visible = true;
                }
                else
                {
                    if (type == "error")
                    {
                        Label4.Text = message;
                        error.Visible = true;
                    }
                }
            }
        }
    }
}
